#include "UseForSortTest.h"
#include <stdlib.h>

const int ShortTestNum=6;
const size_t ShortTestSeed=10;
const int LongTestNum=100000;
const size_t LongTestSeed=50;

int * GenShortTestInt1(size_t &cnt)
{
	cnt=ShortTestNum;
	int *p=new int[ShortTestNum];
	srand(ShortTestSeed);
	for (int i =0; i<ShortTestNum;++i)
		p[i]=rand();
	return p;
}
void ReleaseShortTestInt1(int *p)
{
	if(ShortTestNum>1)
		delete []p;
	else if(ShortTestNum==1)
		delete p;
}
int * GenLongTestInt1(size_t &cnt)
{
	cnt=LongTestNum;
	int *p=new int[LongTestNum];
	srand(LongTestSeed);
	for (int i =0; i<LongTestNum;++i)
		p[i]=rand();
	return p;
}
void ReleaseLongTestInt1(int *p)
{
	if(LongTestNum>1)
		delete []p;
	else if(LongTestNum==1)
		delete p;
}
MyString * GenShortTestMyStr1(size_t &cnt)
{
	cnt=6;
	MyString *p=new MyString[6];
	p[0]="hello";
	p[1]="fuck" ;
	p[2]="I";
	p[3]="you";
	p[4]="wanted";
	p[5]="OK";
	return p;
}
void ReleaseShortTestMyStr1(MyString *p)
{
	delete []p;
}